package com.orchard.orchardfarmmanagementsystem.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import javax.persistence.*;
import java.sql.Timestamp;
import java.time.LocalDateTime;

@Entity
@Data
@Table(name = "inventory")
public class Inventory {

    @Id
    @TableId(type = IdType.AUTO)
    private Integer id;

    @Column(name = "material_id", nullable = false)
    private Integer materialId;

    @Column(nullable = false)
    private Integer currentQuantity;

    private Integer threshold;

    @Column(name = "last_updated", updatable = false)
    private LocalDateTime lastUpdated;

    // Getters and Setters
}